#!/usr/bin/env python
# -*- coding:utf-8 -*-
# @Time: 2022/9/17 3:01
# @Author: 刘航
# @Email: xxx@gmail.com
# @File：base_test.py

"""
用例基类
"""
import unittest
from time import sleep
from selenium import webdriver

class BaseTest(unittest.TestCase):

    def setUp(self) -> None:
        # 打开google浏览器
        self.driver = webdriver.Chrome()
        # 窗口最大化
        self.driver.maximize_window()
        self.driver.implicitly_wait(5)

    def tearDown(self) -> None:
        sleep(2)
        self.driver.quit() #退出浏览器